.class public Llt/noframe/gpsfarmguide/models/GpsModel;
.super Ljava/lang/Object;
.source "GpsModel.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/interfaces/Shape;


# instance fields
.field private points:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private polyline:Lcom/google/android/gms/maps/model/Polyline;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 24
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 25
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public addPoint(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 1

    .line 30
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    if-eqz v0, :cond_0

    .line 31
    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Polyline;->remove()V

    .line 32
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 33
    invoke-static {}, Llt/noframe/gpsfarmguide/utils/Calculations;->getInstance()Llt/noframe/gpsfarmguide/utils/Calculations;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/utils/Calculations;->doDistanceCalculations()V

    .line 34
    iget-object p1, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    invoke-static {p1}, Llt/noframe/gpsfarmguide/utils/Drawing;->drawPolyline(Ljava/util/List;)Lcom/google/android/gms/maps/model/Polyline;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    .line 35
    iget-object p1, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    const/high16 v0, 0x40000000    # 2.0f

    invoke-virtual {p1, v0}, Lcom/google/android/gms/maps/model/Polyline;->setWidth(F)V

    return-void
.end method

.method public deletePoint(Lcom/google/android/gms/maps/model/Marker;)V
    .locals 0

    return-void
.end method

.method public doCalculations()V
    .locals 1

    .line 88
    invoke-static {}, Llt/noframe/gpsfarmguide/utils/Calculations;->getInstance()Llt/noframe/gpsfarmguide/utils/Calculations;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/utils/Calculations;->doDistanceCalculations()V

    return-void
.end method

.method public draw()V
    .locals 1

    .line 78
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Drawing;->drawPolyline(Ljava/util/List;)Lcom/google/android/gms/maps/model/Polyline;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    return-void
.end method

.method public getMarkers()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/Marker;",
            ">;"
        }
    .end annotation

    const/4 v0, 0x0

    return-object v0
.end method

.method public getPoints()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation

    .line 56
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    return-object v0
.end method

.method public getType()I
    .locals 1

    const/4 v0, 0x3

    return v0
.end method

.method public getWkt()Ljava/lang/String;
    .locals 1

    .line 129
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Utils;->linePoints2WKT(Ljava/util/List;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public markMeasure()V
    .locals 2

    .line 103
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    const/high16 v1, 0x40400000    # 3.0f

    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/Polyline;->setWidth(F)V

    return-void
.end method

.method public redraw()V
    .locals 1

    .line 71
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    if-eqz v0, :cond_0

    .line 72
    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Polyline;->remove()V

    .line 73
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Drawing;->drawPolyline(Ljava/util/List;)Lcom/google/android/gms/maps/model/Polyline;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    return-void
.end method

.method public remove()V
    .locals 1

    .line 40
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    if-eqz v0, :cond_0

    .line 41
    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Polyline;->remove()V

    :cond_0
    return-void
.end method

.method public removeMarkers()V
    .locals 0

    return-void
.end method

.method public restoreInitialState()V
    .locals 0

    .line 119
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/models/GpsModel;->remove()V

    return-void
.end method

.method public saveState()V
    .locals 0

    return-void
.end method

.method public setColor(I)V
    .locals 1

    .line 83
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    invoke-virtual {v0, p1}, Lcom/google/android/gms/maps/model/Polyline;->setColor(I)V

    return-void
.end method

.method public setForEditing()V
    .locals 0

    return-void
.end method

.method public setPoints(Ljava/util/List;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;)V"
        }
    .end annotation

    .line 61
    iput-object p1, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->points:Ljava/util/List;

    return-void
.end method

.method public undo()V
    .locals 0

    return-void
.end method

.method public unmarkMeasure()V
    .locals 2

    .line 108
    iget-object v0, p0, Llt/noframe/gpsfarmguide/models/GpsModel;->polyline:Lcom/google/android/gms/maps/model/Polyline;

    if-eqz v0, :cond_0

    const/high16 v1, 0x3f800000    # 1.0f

    .line 109
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/Polyline;->setWidth(F)V

    :cond_0
    return-void
.end method
